/*
 * Copyright 2010 Michael Nitsche
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.mnit.basis.sys.version;


/**
 * @author Michael Nitsche
 * 22.08.2008	Erstellt
 * 05.12.2010	Als Enum
 */
public enum VERSIONSART {

//	FREI              	("Frei",              0, 'F'),
	PRE_ALPHA			("Pre-Alpha",         0, 'X'),
	ALPHA    			("Alpha",             1, 'A'),
	BETA     			("Beta",              2, 'B'),
	RELEASE_CANDIDATE	("RC",                3, 'C'), //Release Candidate / Prerelease
	RELEASE 			("Final",             4, 'F'); //Release


	public final String text;
	public final int wert;
	public final char zeichen;


	private VERSIONSART(String text, int wert, char zeichen) {
		this.text=text;
		this.wert=wert;
		this.zeichen=zeichen;
	}


	public static VERSIONSART gib(int wert) {
		for(VERSIONSART va : VERSIONSART.values())
			if(va.wert==wert)
				return va;
		return null;
	}

	public static VERSIONSART gib(char zeichen) {
		for(VERSIONSART va : VERSIONSART.values())
			if(va.zeichen==zeichen)
				return va;
		return null;
	}

}
